package models

import "gin-app/app/common"

//水源管理
//发源地:序号，水源名称，发源地名称，编号数值
//零售地:序号，水源名称，采购地名称，编号数值

type WaterSourceArea struct {
	common.ID
	Name       string `json:"name" gorm:"size:100;comment:水源名称"`
	SourceName string `json:"source_name" gorm:"size:100;comment:发源地名称"`
	Number     string `json:"number" gorm:"size:100;comment:编号数值"`
	common.Timestamps
	common.SoftDeletes
}

func NewWaterSourceArea(name, source_name, number string) *WaterSourceArea {
	return &WaterSourceArea{
		Name:       name,
		SourceName: source_name,
		Number:     number,
	}
}

type RetailArea struct {
	common.ID
	Name       string `json:"name" gorm:"size:100;comment:水源名称"`
	RetailName string `json:"retail_name" gorm:"size:100;comment:采购地名称"`
	Number     string `json:"number" gorm:"size:100;comment:编号数值"`
	common.Timestamps
	common.SoftDeletes
}

func NewRetailArea(name, retail_name, number string) *RetailArea {
	return &RetailArea{
		Name:       name,
		RetailName: retail_name,
		Number:     number,
	}
}
